# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=oq
pkgver=1.3.5
pkgrel=0
pkgdesc="portable jq wrapper with support of other formats than JSON"
url="https://github.com/blacksmoke16/oq"
arch="x86_64 aarch64"  # limited by Crystal
license="MIT"
depends="jq"
makedepends="crystal libxml2-dev yaml-dev"
source="https://github.com/Blacksmoke16/oq/archive/v$pkgver/oq-$pkgver.tar.gz"

build() {
	mkdir -p bin
	crystal build --release -o bin/oq src/oq_cli.cr
}

check() {
	crystal spec
}

package() {
	install -D -m 755 bin/oq "$pkgdir"/usr/bin/oq
}

sha512sums="
79363a7f57e09930f7cca9f77401f6bcb26507a4def6d5751a5a31051416366c3ce680cd96d5a031f21efd3938eb80f852bbf6f1482b8d08909c612fcc43af6a  oq-1.3.5.tar.gz
"
